<!-- invoiceDetail 页面内容 -->
<section class="invoiceDetail" ng-controller="invoiceDetailCtrl">
    <div class="row margin-reset breadcrumb-row">
      <ol class="breadcrumb padding-reset">
          <li ng-click="goBack();"><a>发票管理</a></li>
          <li><a>发票详情</a></li>
      </ol>
  </div>
    <div class="row margin-reset detail-row">
        <div class="panel yf-shadow">
            <div class="panel-heading">
                <div class="row margin-reset">
                    <div class="pull-left">
                        <div class="line">
                            <span class="show">已发出</span>
                            <span class="tip">预计{{invoice.express_at | date:'yyyy-MM-dd'}}送达</span>
                        </div>
                        <div class="line">交付{{invoice.express_name}}，快递单号{{invoice.number}}</div>
                    </div>
                    <!-- <div class="pull-right left-btn">
                        <a> 取消 </a>
                    </div> -->
                </div>
            </div>
            <div class="panel-body">
                <div class="row margin-reset">
                    <div class="col-sm-6 col-xs-12">
                        <h4>发票信息</h4>
                        <div class="line">
                            发票金额：<span class="money">{{invoice.price}}元</span>
                        </div>
                        <div class="line">
                            公司抬头：{{invoice.company_name}}
                        </div>
                        <div class="line">
                            申请时间：{{invoice.created_at * 1000 | date:"yyyy-MM-dd HH:mm"}}
                        </div>
                        <div class="line">
                            发票内容：{{invoice.content}}
                        </div>
                    </div>
                    <div class="col-sm-6 col-xs-12">
                        <h4>收件人信息</h4>
                        <div class="line">
                            收件人姓名：{{invoice.user_invoice.name}}
                        </div>
                        <div class="line">
                            手机号码：{{invoice.user_invoice.tel}}
                        </div>
                        <div class="line">
                            收件地址：{{invoice.user_invoice.street}}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="row margin-reset order-list-row">
        <div class="panel yf-shadow">
            <div class="panel-heading">
                <div class="row margin-reset">
                    <div class="pull-left">
                        <h4>订单信息</h4>
                    </div>
                    <div class="pull-right order-list-tip">
                        一张发票包含{{orders.length}}个订单
                    </div>
                </div>
            </div>

            <div class="panel-body">
                <div class="row text-center" ng-if="orders.length == 0">
                    暂无可开发票的订单
                </div>
                <div class="row" ng-repeat="order in orders">
                    <div class="col-xs-12">
                        <div class="pull-left">
                            订单号：{{order.serial_number}}
                        </div>
                        <div class="pull-right money">
                            {{ orderTotal(order.total, order.measure_amount) | moneyint }}元
                        </div>
                    </div>

                    <div class="col-xs-12">
                        <div class="pull-left">
                            预估面积：{{order.square}}㎡
                        </div>
                    </div>

                    <div class="col-xs-12">
                        <div class="pull-left">
                            测量：{{order.customer_service_info.name}} / 安装：{{order.service_info.name}}
                        </div>
                        <div class="pull-right">
                            {{order.updated_at * 1000 | date:"yyyy-MM-dd HH:mm"}}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>
